#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'sundx'


def quickSort(array):
    if len(array) < 2:
        return array
    else:
        less = [i for i in array[1:] if i <= array[0]]
        greater = [i for i in array[1:] if i > array[0]]
        return quickSort(less) + [array[0]] + quickSort(greater)


print (quickSort([3,5,7,3,9,5,2]))





